{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 283,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import sklearn\n",
    "from sklearn import preprocessing\n",
    "from matplotlib import pyplot as plt\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.metrics import mean_squared_error\n",
    "from sklearn.metrics import log_loss,roc_auc_score,accuracy_score,confusion_matrix\n",
    "import seaborn as sns \n",
    "from sklearn.ensemble import RandomForestClassifier"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 284,
   "metadata": {},
   "outputs": [],
   "source": [
    "train1 = pd.read_csv('features.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 285,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LabelEncoder()"
      ]
     },
     "execution_count": 285,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "le=preprocessing.LabelEncoder()\n",
    "le.fit(train1['school'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 286,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['GP', 'MS'], dtype=object)"
      ]
     },
     "execution_count": 286,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "le.classes_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 287,
   "metadata": {},
   "outputs": [],
   "source": [
    "train1['school']=le.transform(train1['school'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 288,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>age</th>\n",
       "      <th>address</th>\n",
       "      <th>famsize</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Medu</th>\n",
       "      <th>Fedu</th>\n",
       "      <th>Mjob</th>\n",
       "      <th>Fjob</th>\n",
       "      <th>...</th>\n",
       "      <th>health</th>\n",
       "      <th>absences</th>\n",
       "      <th>G1</th>\n",
       "      <th>G2</th>\n",
       "      <th>G3</th>\n",
       "      <th>subject</th>\n",
       "      <th>FinalGrade</th>\n",
       "      <th>Regularity</th>\n",
       "      <th>Grade1</th>\n",
       "      <th>Grade2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>F</td>\n",
       "      <td>18</td>\n",
       "      <td>U</td>\n",
       "      <td>GT3</td>\n",
       "      <td>A</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>at_home</td>\n",
       "      <td>teacher</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>11</td>\n",
       "      <td>Portuguese</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Failure</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>F</td>\n",
       "      <td>17</td>\n",
       "      <td>U</td>\n",
       "      <td>GT3</td>\n",
       "      <td>T</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>at_home</td>\n",
       "      <td>other</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>11</td>\n",
       "      <td>11</td>\n",
       "      <td>Portuguese</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Poor</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>F</td>\n",
       "      <td>15</td>\n",
       "      <td>U</td>\n",
       "      <td>LE3</td>\n",
       "      <td>T</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>at_home</td>\n",
       "      <td>other</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>12</td>\n",
       "      <td>Portuguese</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>F</td>\n",
       "      <td>15</td>\n",
       "      <td>U</td>\n",
       "      <td>GT3</td>\n",
       "      <td>T</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>health</td>\n",
       "      <td>services</td>\n",
       "      <td>...</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>Portuguese</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>F</td>\n",
       "      <td>16</td>\n",
       "      <td>U</td>\n",
       "      <td>GT3</td>\n",
       "      <td>T</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>other</td>\n",
       "      <td>other</td>\n",
       "      <td>...</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>13</td>\n",
       "      <td>13</td>\n",
       "      <td>Portuguese</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 38 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   school sex  age address famsize Pstatus  Medu  Fedu     Mjob      Fjob  \\\n",
       "0       0   F   18       U     GT3       A     4     4  at_home   teacher   \n",
       "1       0   F   17       U     GT3       T     1     1  at_home     other   \n",
       "2       0   F   15       U     LE3       T     1     1  at_home     other   \n",
       "3       0   F   15       U     GT3       T     4     2   health  services   \n",
       "4       0   F   16       U     GT3       T     3     3    other     other   \n",
       "\n",
       "       ...      health absences  G1  G2  G3     subject    FinalGrade  \\\n",
       "0      ...           3        4   0  11  11  Portuguese  Satisfactory   \n",
       "1      ...           3        2   9  11  11  Portuguese  Satisfactory   \n",
       "2      ...           3        6  12  13  12  Portuguese  Satisfactory   \n",
       "3      ...           5        0  14  14  14  Portuguese  Satisfactory   \n",
       "4      ...           5        0  11  13  13  Portuguese  Satisfactory   \n",
       "\n",
       "       Regularity        Grade1        Grade2  \n",
       "0  Always Regular       Failure  Satisfactory  \n",
       "1  Always Regular          Poor  Satisfactory  \n",
       "2  Always Regular  Satisfactory  Satisfactory  \n",
       "3  Always Regular  Satisfactory  Satisfactory  \n",
       "4  Always Regular  Satisfactory  Satisfactory  \n",
       "\n",
       "[5 rows x 38 columns]"
      ]
     },
     "execution_count": 288,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train1.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 289,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['school', 'sex', 'age', 'address', 'famsize', 'Pstatus', 'Medu', 'Fedu',\n",
       "       'Mjob', 'Fjob', 'reason', 'guardian', 'traveltime', 'studytime',\n",
       "       'failures', 'schoolsup', 'famsup', 'paid', 'activities', 'nursery',\n",
       "       'higher', 'internet', 'romantic', 'famrel', 'freetime', 'goout', 'Dalc',\n",
       "       'Walc', 'health', 'absences', 'G1', 'G2', 'G3', 'subject', 'FinalGrade',\n",
       "       'Regularity', 'Grade1', 'Grade2'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 289,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train1.columns\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 290,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['sex'])\n",
    "train1['sex']=le.transform(train1['sex'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 291,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['subject'])\n",
    "train1['subject']=le.transform(train1['subject'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 292,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['address'])\n",
    "train1['address']=le.transform(train1['address'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 293,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['famsize'])\n",
    "train1['famsize']=le.transform(train1['famsize'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 294,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['Pstatus'])\n",
    "train1['Pstatus']=le.transform(train1['Pstatus'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 295,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['Mjob'])\n",
    "train1['Mjob']=le.transform(train1['Mjob'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 296,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['Fjob'])\n",
    "train1['Fjob']=le.transform(train1['Fjob'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 297,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['reason'])\n",
    "train1['reason']=le.transform(train1['reason'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 298,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['guardian'])\n",
    "train1['guardian']=le.transform(train1['guardian'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 299,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['schoolsup'])\n",
    "train1['schoolsup']=le.transform(train1['schoolsup'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 300,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['famsup'])\n",
    "train1['famsup']=le.transform(train1['famsup'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 301,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['paid'])\n",
    "train1['paid']=le.transform(train1['paid'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 302,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['activities'])\n",
    "train1['activities']=le.transform(train1['activities'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 303,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['nursery'])\n",
    "train1['nursery']=le.transform(train1['nursery'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 304,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['higher'])\n",
    "train1['higher']=le.transform(train1['higher'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 305,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['internet'])\n",
    "train1['internet']=le.transform(train1['internet'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 306,
   "metadata": {},
   "outputs": [],
   "source": [
    "le.fit(train1['romantic'])\n",
    "train1['romantic']=le.transform(train1['romantic'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 307,
   "metadata": {},
   "outputs": [],
   "source": [
    "# train1 = pd.get_dummies(train1)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 308,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>age</th>\n",
       "      <th>address</th>\n",
       "      <th>famsize</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Medu</th>\n",
       "      <th>Fedu</th>\n",
       "      <th>Mjob</th>\n",
       "      <th>Fjob</th>\n",
       "      <th>...</th>\n",
       "      <th>health</th>\n",
       "      <th>absences</th>\n",
       "      <th>G1</th>\n",
       "      <th>G2</th>\n",
       "      <th>G3</th>\n",
       "      <th>subject</th>\n",
       "      <th>FinalGrade</th>\n",
       "      <th>Regularity</th>\n",
       "      <th>Grade1</th>\n",
       "      <th>Grade2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Failure</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>11</td>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Poor</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>...</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>16</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>13</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>16</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>12</td>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>16</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>10</td>\n",
       "      <td>13</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Poor</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>16</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>Good</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Good</td>\n",
       "      <td>Good</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>10 rows × 38 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   school  sex  age  address  famsize  Pstatus  Medu  Fedu  Mjob  Fjob  \\\n",
       "0       0    0   18        1        0        0     4     4     0     4   \n",
       "1       0    0   17        1        0        1     1     1     0     2   \n",
       "2       0    0   15        1        1        1     1     1     0     2   \n",
       "3       0    0   15        1        0        1     4     2     1     3   \n",
       "4       0    0   16        1        0        1     3     3     2     2   \n",
       "5       0    1   16        1        1        1     4     3     3     2   \n",
       "6       0    1   16        1        1        1     2     2     2     2   \n",
       "7       0    0   17        1        0        0     4     4     2     4   \n",
       "8       0    1   15        1        1        0     3     2     3     2   \n",
       "9       0    1   15        1        0        1     3     4     2     2   \n",
       "\n",
       "       ...       health  absences  G1  G2  G3  subject    FinalGrade  \\\n",
       "0      ...            3         4   0  11  11        1  Satisfactory   \n",
       "1      ...            3         2   9  11  11        1  Satisfactory   \n",
       "2      ...            3         6  12  13  12        1  Satisfactory   \n",
       "3      ...            5         0  14  14  14        1  Satisfactory   \n",
       "4      ...            5         0  11  13  13        1  Satisfactory   \n",
       "5      ...            5         6  12  12  13        1  Satisfactory   \n",
       "6      ...            3         0  13  12  13        1  Satisfactory   \n",
       "7      ...            1         2  10  13  13        1  Satisfactory   \n",
       "8      ...            1         0  15  16  17        1          Good   \n",
       "9      ...            5         0  12  12  13        1  Satisfactory   \n",
       "\n",
       "       Regularity        Grade1        Grade2  \n",
       "0  Always Regular       Failure  Satisfactory  \n",
       "1  Always Regular          Poor  Satisfactory  \n",
       "2  Always Regular  Satisfactory  Satisfactory  \n",
       "3  Always Regular  Satisfactory  Satisfactory  \n",
       "4  Always Regular  Satisfactory  Satisfactory  \n",
       "5  Always Regular  Satisfactory  Satisfactory  \n",
       "6  Always Regular  Satisfactory  Satisfactory  \n",
       "7  Always Regular          Poor  Satisfactory  \n",
       "8  Always Regular          Good          Good  \n",
       "9  Always Regular  Satisfactory  Satisfactory  \n",
       "\n",
       "[10 rows x 38 columns]"
      ]
     },
     "execution_count": 308,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train1.head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 309,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>age</th>\n",
       "      <th>address</th>\n",
       "      <th>famsize</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Medu</th>\n",
       "      <th>Fedu</th>\n",
       "      <th>Mjob</th>\n",
       "      <th>Fjob</th>\n",
       "      <th>...</th>\n",
       "      <th>health</th>\n",
       "      <th>absences</th>\n",
       "      <th>G1</th>\n",
       "      <th>G2</th>\n",
       "      <th>G3</th>\n",
       "      <th>subject</th>\n",
       "      <th>FinalGrade</th>\n",
       "      <th>Regularity</th>\n",
       "      <th>Grade1</th>\n",
       "      <th>Grade2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Failure</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>11</td>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Poor</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>...</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>16</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>13</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Always Regular</td>\n",
       "      <td>Satisfactory</td>\n",
       "      <td>Satisfactory</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 38 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   school  sex  age  address  famsize  Pstatus  Medu  Fedu  Mjob  Fjob  \\\n",
       "0       0    0   18        1        0        0     4     4     0     4   \n",
       "1       0    0   17        1        0        1     1     1     0     2   \n",
       "2       0    0   15        1        1        1     1     1     0     2   \n",
       "3       0    0   15        1        0        1     4     2     1     3   \n",
       "4       0    0   16        1        0        1     3     3     2     2   \n",
       "\n",
       "       ...       health  absences  G1  G2  G3  subject    FinalGrade  \\\n",
       "0      ...            3         4   0  11  11        1  Satisfactory   \n",
       "1      ...            3         2   9  11  11        1  Satisfactory   \n",
       "2      ...            3         6  12  13  12        1  Satisfactory   \n",
       "3      ...            5         0  14  14  14        1  Satisfactory   \n",
       "4      ...            5         0  11  13  13        1  Satisfactory   \n",
       "\n",
       "       Regularity        Grade1        Grade2  \n",
       "0  Always Regular       Failure  Satisfactory  \n",
       "1  Always Regular          Poor  Satisfactory  \n",
       "2  Always Regular  Satisfactory  Satisfactory  \n",
       "3  Always Regular  Satisfactory  Satisfactory  \n",
       "4  Always Regular  Satisfactory  Satisfactory  \n",
       "\n",
       "[5 rows x 38 columns]"
      ]
     },
     "execution_count": 309,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train1['FinalGrade'] = 'na'\n",
    "train1.loc[(train1.G3 >= 18) & (train1.G3 <= 20), 'FinalGrade'] = 'Excellent'\n",
    "train1.loc[(train1.G3 >= 15) & (train1.G3 <= 17), 'FinalGrade'] = 'Good' \n",
    "train1.loc[(train1.G3 >= 11) & (train1.G3 <= 14), 'FinalGrade'] = 'Satisfactory' \n",
    "train1.loc[(train1.G3 >= 6) & (train1.G3 <= 10), 'FinalGrade'] = 'Poor' \n",
    "train1.loc[(train1.G3 >= 0) & (train1.G3 <= 5), 'FinalGrade'] = 'Failure' \n",
    "train1.head(5)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 310,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>age</th>\n",
       "      <th>address</th>\n",
       "      <th>famsize</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Medu</th>\n",
       "      <th>Fedu</th>\n",
       "      <th>Mjob</th>\n",
       "      <th>Fjob</th>\n",
       "      <th>...</th>\n",
       "      <th>health</th>\n",
       "      <th>absences</th>\n",
       "      <th>G1</th>\n",
       "      <th>G2</th>\n",
       "      <th>G3</th>\n",
       "      <th>subject</th>\n",
       "      <th>FinalGrade</th>\n",
       "      <th>Regularity</th>\n",
       "      <th>Grade1</th>\n",
       "      <th>Grade2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>11</td>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>...</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>16</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>13</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 38 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   school  sex  age  address  famsize  Pstatus  Medu  Fedu  Mjob  Fjob  \\\n",
       "0       0    0   18        1        0        0     4     4     0     4   \n",
       "1       0    0   17        1        0        1     1     1     0     2   \n",
       "2       0    0   15        1        1        1     1     1     0     2   \n",
       "3       0    0   15        1        0        1     4     2     1     3   \n",
       "4       0    0   16        1        0        1     3     3     2     2   \n",
       "\n",
       "    ...    health  absences  G1  G2  G3  subject  FinalGrade  Regularity  \\\n",
       "0   ...         3         4   0  11  11        1           4           0   \n",
       "1   ...         3         2   9  11  11        1           4           0   \n",
       "2   ...         3         6  12  13  12        1           4           0   \n",
       "3   ...         5         0  14  14  14        1           4           0   \n",
       "4   ...         5         0  11  13  13        1           4           0   \n",
       "\n",
       "   Grade1  Grade2  \n",
       "0       1       4  \n",
       "1       3       4  \n",
       "2       4       4  \n",
       "3       4       4  \n",
       "4       4       4  \n",
       "\n",
       "[5 rows x 38 columns]"
      ]
     },
     "execution_count": 310,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "le.fit(train1['FinalGrade'])\n",
    "train1['FinalGrade']=le.transform(train1['FinalGrade'])\n",
    "le.fit(train1['Regularity'])\n",
    "train1['Regularity']=le.transform(train1['Regularity'])\n",
    "le.fit(train1['Grade1'])\n",
    "train1['Grade1']=le.transform(train1['Grade1'])\n",
    "le.fit(train1['Grade2'])\n",
    "train1['Grade2']=le.transform(train1['Grade2'])\n",
    "train1.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 311,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>age</th>\n",
       "      <th>address</th>\n",
       "      <th>famsize</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Medu</th>\n",
       "      <th>Fedu</th>\n",
       "      <th>Mjob</th>\n",
       "      <th>Fjob</th>\n",
       "      <th>...</th>\n",
       "      <th>Dalc</th>\n",
       "      <th>Walc</th>\n",
       "      <th>health</th>\n",
       "      <th>absences</th>\n",
       "      <th>G1</th>\n",
       "      <th>G2</th>\n",
       "      <th>subject</th>\n",
       "      <th>Regularity</th>\n",
       "      <th>Grade1</th>\n",
       "      <th>Grade2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>14</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>16</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 36 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   school  sex  age  address  famsize  Pstatus  Medu  Fedu  Mjob  Fjob  \\\n",
       "0       0    0   18        1        0        0     4     4     0     4   \n",
       "1       0    0   17        1        0        1     1     1     0     2   \n",
       "2       0    0   15        1        1        1     1     1     0     2   \n",
       "3       0    0   15        1        0        1     4     2     1     3   \n",
       "4       0    0   16        1        0        1     3     3     2     2   \n",
       "\n",
       "    ...    Dalc  Walc  health  absences  G1  G2  subject  Regularity  Grade1  \\\n",
       "0   ...       1     1       3         4   0  11        1           0       1   \n",
       "1   ...       1     1       3         2   9  11        1           0       3   \n",
       "2   ...       2     3       3         6  12  13        1           0       4   \n",
       "3   ...       1     1       5         0  14  14        1           0       4   \n",
       "4   ...       1     2       5         0  11  13        1           0       4   \n",
       "\n",
       "   Grade2  \n",
       "0       4  \n",
       "1       4  \n",
       "2       4  \n",
       "3       4  \n",
       "4       4  \n",
       "\n",
       "[5 rows x 36 columns]"
      ]
     },
     "execution_count": 311,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y=train1.FinalGrade\n",
    "train1 = train1.drop(labels=['G3','FinalGrade'],axis=1)\n",
    "train1.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 312,
   "metadata": {},
   "outputs": [],
   "source": [
    "                                ###  SPLIT DATA ###"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 313,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(730, 36)\n",
      "(730,)\n",
      "(314, 36)\n",
      "(314,)\n"
     ]
    }
   ],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "x_train,x_val,y_train,y_val = train_test_split(train1,y,test_size=0.3)\n",
    "print(x_train.shape)\n",
    "print(y_train.shape)\n",
    "print(x_val.shape)\n",
    "print(y_val.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 314,
   "metadata": {},
   "outputs": [],
   "source": [
    "                        ###  LOGISTIC REGRESSION  ###"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 315,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/srujan/anaconda3/lib/python3.6/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n",
      "  FutureWarning)\n",
      "/home/srujan/anaconda3/lib/python3.6/site-packages/sklearn/linear_model/logistic.py:459: FutureWarning: Default multi_class will be changed to 'auto' in 0.22. Specify the multi_class option to silence this warning.\n",
      "  \"this warning.\", FutureWarning)\n"
     ]
    }
   ],
   "source": [
    "lr =  LogisticRegression()\n",
    "lr.fit(x_train,y_train)\n",
    "y_pred = lr.predict(x_val)\n",
    "y_predict = lr.predict_proba(x_val)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 316,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(314,)\n",
      "(314, 5)\n",
      "Log_Loss:  0.5402681176579688\n",
      "Accuracy_Score:  0.8471337579617835\n"
     ]
    }
   ],
   "source": [
    "print(y_val.shape)\n",
    "print(y_predict.shape)\n",
    "print(\"Log_Loss: \",log_loss(y_val,y_predict))\n",
    "print(\"Accuracy_Score: \",accuracy_score(y_val,y_pred))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 317,
   "metadata": {},
   "outputs": [],
   "source": [
    "                        ###   CONFUSION MATRIX   ###"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 318,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAogAAAH+CAYAAAAf2v/7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvqOYd8AAAIABJREFUeJzt3Xm8VXW5+PHPcwAFFUdUBDQc0ybRlGuWpZlj4pA3h5tD5Y0c6mqaXktvNy2b0+RnDnQzLXOgq14nzCnnnNBIEXHAETiAOE8ph/P8/jgbOvsIh+OSzdpn78/b13qdvddae61ns1jHh+c7rMhMJEmSpPlayg5AkiRJ9cUEUZIkSVVMECVJklTFBFGSJElVTBAlSZJUxQRRkiRJVUwQJb0vETEgIq6KiFci4k/v4zhfiojrl2RsZYiIayPi4LLjkKT3wwRRahIR8W8RMSEiXo+I1koi86klc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MOPAW7NzE2BzYGHgeOBqZXq5bERsSOwITASGAF8PCI+HREfp+NRYZvRkYBu2YOvc1lmblk53yNA5yflDAc+A3weOLvyHQ4BXsnMLSvH/1pErNvlmIcCp2fmCGALOp65LkkNo2/ZAUiqKwMiYmLl9e10PAN5CPBMZt5dWb8V8CHgzo7HJLMMHY8q3Bh4KjMfB4iIC4DRCznHZ4GDADJzHvBKRKzSZZ8dK8vfKu9XoCNhHAhcnplvVs7Rk+eafyQifkhHM/YKdDz2cr5xmdkOPB4RT1a+w47Axzr1T1ypcu7HOn3uLuCEiBhGRwL6eA/ikKRewwRRUmdvVapiC1SSwDc6r6Ljebv7d9lvBLCknt0ZwI8z85wu5ziqwDnOA/bMzL9HxJeBbTtt63qsrJz7m5nZOZEkIoYv2Cnzwoi4h47K43UR8e+Z+Zf3GJck1S2bmCW9V3cDn4yIDQAiYrmI2AiYAqwbEetX9tt/EZ+/CTis8tk+EbEi8Bod1cH5rgO+2qlv49CIWAO4DdgrIgZExEA6mrMXZyDQGhH9gC912fbFiGipxLwe8Gjl3IdV9iciNoqI5Tt/KCLWA57MzDHAlcDHehCHJPUaVhAlvSeZ+XylEndRRCxbWX1iZj4WEaOBayJiDnAH8JGFHOJIYGxEHALMAw7LzLsi4s7KNDLXVvohbgLcValgvg4ckJkPRMQlwETgGTqawRfnv4B7Kvs/RHUi+ihwK7AmcGhm/iMi/oeOvokPRMfJnwf27HLMfYEDImIuMBM4uQdxSFKvEZlLqkVIkiRJjcAmZkmSJFUxQZQkSVIVE0RJkiRVMUGUJElSFRNESZIkVTFBlCRJUhUTREmSJFX5/+5Tj5xRFLm1AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 842.4x595.44 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "labels = list(range(0,21))\n",
    "cm=confusion_matrix(y_val,y_pred)\n",
    "a4_dims = (11.7, 8.27)\n",
    "fig, ax = plt.subplots(figsize=a4_dims)\n",
    "ax= plt.subplot()\n",
    "sns.heatmap(cm, annot=True, ax = ax); #annot=True to annotate cells\n",
    "\n",
    "# labels, title and ticks\n",
    "ax.set_xlabel('Predicted labels');ax.set_ylabel('True labels'); \n",
    "ax.set_title('Confusion Matrix'); \n",
    "ax.xaxis.set_ticklabels(labels); ax.yaxis.set_ticklabels(labels);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 319,
   "metadata": {},
   "outputs": [],
   "source": [
    "                        ###   RANDOM FOREST   ###"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 320,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Raondom Forest Model Score : 0.9602739726027397 , Cross Validation Score : 0.8598726114649682\n"
     ]
    }
   ],
   "source": [
    "random_forest = RandomForestClassifier(n_estimators=36,min_samples_leaf=2)\n",
    "\n",
    "f = random_forest.fit(x_train, y_train)\n",
    "\n",
    "print(\"Raondom Forest Model Score\" , \":\" , f.score(x_train, y_train) , \",\" ,\n",
    "      \"Cross Validation Score\" ,\":\" , f.score(x_val, y_val))\n",
    "Y_pred = random_forest.predict_proba(x_val)\n",
    "Y_pred1 = random_forest.predict(x_val)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 321,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.4427279764794684\n"
     ]
    }
   ],
   "source": [
    "print(log_loss(y_val,Y_pred))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 322,
   "metadata": {},
   "outputs": [],
   "source": [
    "                    ### CONFUSION MATRIX ###"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 323,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAogAAAH+CAYAAAAf2v/7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGx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c4DpherV4eExHjgA2BLYCxwPsiYtuIeB+VR4VtQiUB3bwXX+eSzNy8er57gdon5YwGPgTsDvys+h0OAZ7PzM2rxz80ItbrdszPAz/JzLHAZlSeuS5JLWNg2QFIaiorRMTU6us/UnkG8gjg0cz8S3X9lsA7gT9VHpPMYCqPKnwH8HBmPggQEecBExZzjh2AgwAysxN4PiJW7bbPuOpyZ/X9UCoJ4zDg0sycVz1Hb55r/u6I+DaVZuyhVB57udDkzOwCHoyIGdXvMA54b03/xJWr536g5nM3A8dHxCgqCeiDvYhDkvoNE0RJtV6pVsUWqSaBL9euovK83QO67TcW6Ktndwbwncz8ebdzHFXgHJOAfTLzbxHxKWC7mm3dj5XVc38xM2sTSSJi9KKdMs+PiFuoVB6viYjPZuYf3mBcktS0bGKW9Eb9BfhARGwAEBFDImIj4D5gvYh4W3W/A5bw+RuAw6qfHRARKwEvUqkOLnQN8Jmavo0jI2JN4CZg34hYISKGUWnOXpphwNyIGAR8stu2j0dERzXm9YH7q+c+rLo/EbFRRKxY+6GIWB+YkZmnAZcD7+1FHJLUb1hBlPSGZOaT1UrcBRGxXHX1CZn5QERMAK6KiKeAKcC7F3OII4GJEXEI0Akclpk3R8SfqtPI/K7aD3EMcHO1gvkSMD4z74iIi4CpwKNUmsGX5j+AW6r7/536RPR+4P+AtYDPZ+Y/I+KXVPom3hGVkz8J7NPtmPsD4yNiPvAYcFIv4pCkfiMy+6pFSJIkSa3AJmZJkiTVMUGUJElSHRNESZIk1TFBlCRJUh0TREmSJNUxQZQkSVIdE0RJkiTV+f/byFXqr+XAUAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 842.4x595.44 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "labels = list(range(0,21))\n",
    "cm=confusion_matrix(y_val,Y_pred1)\n",
    "a4_dims = (11.7, 8.27)\n",
    "fig, ax = plt.subplots(figsize=a4_dims)\n",
    "ax= plt.subplot()\n",
    "sns.heatmap(cm, annot=True, ax = ax); #annot=True to annotate cells\n",
    "\n",
    "# labels, title and ticks\n",
    "ax.set_xlabel('Predicted labels');ax.set_ylabel('True labels'); \n",
    "ax.set_title('Confusion Matrix'); \n",
    "ax.xaxis.set_ticklabels(labels); ax.yaxis.set_ticklabels(labels);"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
